/*****************************************************
 * This is for Matrix operations.
 */
#ifndef _MATRIX_LIB_H
#define _MATRIX_LIB_H

#ifndef kalmanType
#define kalmanType double
#endif

extern void addMatrix(kalmanType *A, kalmanType *B, kalmanType *C, int len, bool isSubtract);
extern void multMatrix(kalmanType *A, kalmanType *B, kalmanType *C, int A_rows, int A_cols, int B_cols);
extern void matTranspose(kalmanType *curMat, int numRows, int numCols);
extern void normalizeVector(kalmanType *vec, int len);
extern void dbg_PrintMat(kalmanType* argMat, int numRows, int numCols);
extern void q2qmat_c(kalmanType *quaternion, kalmanType *qmat);
extern void q_turn(kalmanType* quaternion, kalmanType* pqrdt2, kalmanType* quaternionMat, kalmanType* tmp_multResult_4, kalmanType* updatedQuaternion);
#endif
